A rapid approach for sex assignment by RAD-seq using a reference genome

Sex identification is a common objective in molecular ecology. While many vertebrates display sexual dimorphism, determining the sex can be challenging in certain situations, such as species lacking clear sex-related phenotypic characteristics or in studies using non-invasive methods. In these cases, DNA analyses serve as valuable tools not only for sex determination but also for validating sex assignment based on phenotypic traits. In this study, we developed a bioinformatic framework for sex assignment using genomic data obtained through GBS, and having an available closely related genome assembled at the chromosome level. Our method consists of two ad hoc indexes that rely on the different properties of the mammalian heteromorphic sex chromosomes. For this purpose, we mapped RAD-seq loci to a reference genome and then obtained missingness and coverage depth values for the autosomes and X and Y chromosomes of each individual. Our methodology successfully determined the sex of 165 fur seals that had been phenotypically sexed in a previous study and 40 sea lions sampled in a non-invasive way. Additionally, we evaluated the accuracy of each index in sequences with varying average coverage depths, with Index Y proving greater reliability and robustness in assigning sex to individuals with low-depth coverage. We believe that the approach presented here can be extended to any animal taxa with known heteromorphic XY/ZW sex chromosome systems and that it can tolerate various qualities of GBS sequencing data.


Objective Objective
Determining the sex of different individuals using GBS and a reference genome, based on the distinct properties of mammalian sex chromosomes X and Y.

Usage Usage
Here is a detailed step-by-step procedure, beginning with raw sequences and concluding with sex identification.
Alingment to a Reference Genome Alingment to a Reference Genome 1.Create a directory, here we call it sexing.Then create the follow subdirectories.retain as many markers associated with sex chromosomes as possible.Thus, considering that Y linked loci are present only in males, we set the minimum proportion of individuals across populations to process a locus (-R) to 0.3, which assumes a minimum of 30 % of males in our data set.The flag --vcf-all retrieves all the positions within the RAD-loci, containing fixed and variable sites.

Sex identification Sex identification
1. 6.Enter to the "populations" directory and obtain files of missingness and depth of coverage of each individual for chromosomes X, Y and the autosomal.VCFtools --chr flag uses loci contained in a specified chromosome, while --not-chr avoids those we chose.Here, we attempted to automate the process.First, create a list of the names of sex chromosomes.To do this, enter to the chosen species genome directory from https://www.ncbi.nlm.nih.gov/genome/ and copy the chromosome identifiers from the column "RefSeq".In our case: Y (NC_045613.1) and X (NC_045612.1).After that, paste them into a new file we call chromosome.list.txt.

Our file looks like:
After saving, make a directory to deposit the new files (we call it "sexing") and make the next loop to create the files of interest in one step.do n=${f%%.imiss_2_.tsv}filename=`echo ${f:r}`; sed -i -e "s/F_MISS/F_MISS_$n/" $f; done for f in *.idepth_2_.tsv;do n=${f%%.idepth_2_.tsv}filename=`echo ${f:r}`; sed -i -e "s/MEAN_DEPTH/M_DEPTH_$n/" $f; done 6.1.Run the script "sexing.R" inside the "sexing" directory to calculate Index_X and Index_Y and to reveal the sex of each individual.
Two new files will appear when it finishes, "final_sexing.csv",containing results and "sexing_plots.pdf",containing the different plots.Next, there are examples of the output files.
First, an example of the table "final_sexing.csv".And second, an example of the figures.

Figure
Figure A corresponds to a dispersion plot of Index Y and X. Figure B corresponds to one of the control figures showing Index Y vs Coverage depth.In both cases, red dots include male individuals, and black dots include females.